package com.jfm.jfmm.collector.entity.collect;

import com.jfm.jfmm.collector.enums.CollectorProtocol;
import lombok.Data;

/**
 * @author DYang
 * @since 2024-10-09 21:43
 * @description 数据采集结果
 */
@Data
public class CollectResult {

    /**
     * 采集协议
     */
    private CollectorProtocol protocol;

    /**
     * 采集数据
     */
    private Result result;

    /**
     * 开始采集时间
     */
    private long startTime;
    /**
     * 采集时长
     */
    private long responseTime;


    public CollectResult protocol(CollectorProtocol protocol){
        this.protocol = protocol;
        return this;
    }

    public CollectResult result(Result result){
        this.result = result;
        return this;
    }

    public CollectResult startTime(long startTime){
        this.startTime = startTime;
        return this;
    }

    public CollectResult responseTime(long responseTime){
        this.responseTime = responseTime;
        return this;
    }
}

